//
//  Common.swift
//  sina
//
//  Created by shengxinwei on 16/5/19.
//  Copyright © 2016年 shengxinwei. All rights reserved.
//

import UIKit

struct API {
    static let hostName = "https://api.weibo.com/"
    //    static let hostName = "https://dev.api.weibo.com/"
    //加载用户token
    static let loadAccessToken = "oauth2/access_token"
    //加载用户信息
    static let loadUserInfo = "2/users/show.json"
    //加载首页数据
    static let loadHomedata = "2/statuses/home_timeline.json"
    //发布微博
    static let sendStatus = "2/statuses/update.json"
    //发布带图片的微博
    static let sendImageStatus = "https://upload.api.weibo.com/2/statuses/upload.json"
    

}

//在同一命名空间下,所有文件默认贡献
let ScreenWidth = UIScreen.mainScreen().bounds.width
let ScreenHeight  = UIScreen.mainScreen().bounds.height

//用户登录授权配置信息
let client_id = "659213441"
let client_secret = "a421e3dee38eeb1bc7eb5827a5052a68"
//授权跳转界面
let redirect_uri = "http://www.jianshu.com"

let sharedDF = NSDateFormatter()
func randomColor() -> UIColor {
    let red = CGFloat(random() % 256) / 255.0
    let blue = CGFloat(random() % 256) / 255.0
    let green = CGFloat(random() % 256) / 255.0
    
    return UIColor(red: red, green: green, blue: blue, alpha: 1)
}